package emp.jsf.servicio.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import emp.entidades.EntCliente;
import emp.jsf.servicio.ClienteService;
import emp.repositorios.ClienteRepository;

@Service("ClienteService")
public class ClienteServiceImpl implements ClienteService{

	@Autowired
	ClienteRepository clienteRepository;
	
	public List<EntCliente> listarClientes(){
		return clienteRepository.findAll();
	}
	
	public EntCliente grabarCliente(EntCliente ent){
		return clienteRepository.save(ent);
	}
	
	public void eliminar(EntCliente ent){
		clienteRepository.delete(ent);
	}
	
}
